-- GENERATED SPELL FOR [Crimson Conjuror] --


function spell0_10419(pUnit, Event) --@Frost Nova,Self--
pUnit:FullCastSpellOnTarget(12674,pUnit)
pUnit:RegisterEvent('Sorts_10419', 8326, 1)
end

function spell1_10419(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(12675,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10419', 7000, 1)
end

function spell2_10419(pUnit, Event) --@Scorch,n/a--
pUnit:FullCastSpellOnTarget(17195,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10419', 1500, 1)
end

function spell3_10419(pUnit, Event) --@Summon Water Elemental,Self--
pUnit:FullCastSpellOnTarget(17162,pUnit)
pUnit:RegisterEvent('Sorts_10419', 2000, 1)
end

function Sorts_10419(pUnit, Event)
local choix_sorts_10419 = math.random(0, 3)
if choix_sorts_10419 == 0 then
pUnit:RegisterEvent('spell0_10419', 1, 1)
end
if choix_sorts_10419 == 1 then
pUnit:RegisterEvent('spell1_10419', 1, 1)
end
if choix_sorts_10419 == 2 then
pUnit:RegisterEvent('spell2_10419', 1, 1)
end
if choix_sorts_10419 == 3 then
pUnit:RegisterEvent('spell3_10419', 1, 1)
end
end

function mob10419_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_10419', math.random(1500, 3000), 1)
end

function mob10419_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10419_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10419_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(10419, 1, 'mob10419_Action')
RegisterUnitEvent(10419, 2, 'mob10419_Leave')
RegisterUnitEvent(10419, 3, 'mob10419_Kill')
RegisterUnitEvent(10419, 4, 'mob10419_Die')
